package com.gohome.gohomechat.model;

import android.os.AsyncTask;

import com.gohome.gohomechat.presenter.presenterlistener.IDataRequestListener;

/**
 * Created by dllo on 16/3/11.
 */
public class CircleModel {
    public CircleModel(){

    }
    public void deleteCircle( final IDataRequestListener listener) {
        requestServer(listener);
    }

    public void addFavort( final IDataRequestListener listener) {
        requestServer(listener);
    }

    public void deleteFavort(final IDataRequestListener listener) {
        requestServer(listener);
    }

    public void addComment( final IDataRequestListener listener) {
        requestServer(listener);
    }

    public void deleteComment( final IDataRequestListener listener) {
        requestServer(listener);
    }
    private void requestServer(final IDataRequestListener listener){
        new AsyncTask<Object,Integer,Object>(){
            @Override
            protected Object doInBackground(Object... params) {
                //和后台交互
                return null;
            }
            protected void onPostExecute(Object result){
                listener.loadSuccess(result);
            };

        }.execute();
    }
}
